<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 4.2.1">
  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/cheese16.png">
  <link rel="mask-icon" href="/blog/images/logo.svg" color="#222">

<link rel="stylesheet" href="/blog/css/main.css">


<link rel="stylesheet" href="/blog/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"bankounailao.gitee.io","root":"/blog/","scheme":"Pisces","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":true},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="本来搭建博客的想法是要从0开始，从前端到后端，然后部署到服务器的博客。看了一下相关视频和资料，想想还是算了。这不仅因为我懒，还因为看到了hexo。">
<meta property="og:type" content="article">
<meta property="og:title" content="在gitee上搭建hexo上的那些坑">
<meta property="og:url" content="https://bankounailao.gitee.io/blog/2020/06/01/%E5%9C%A8gitee%E4%B8%8A%E6%90%AD%E5%BB%BAhexo%E4%B8%8A%E7%9A%84%E9%82%A3%E4%BA%9B%E5%9D%91/index.html">
<meta property="og:site_name" content="半口奶酪的小站">
<meta property="og:description" content="本来搭建博客的想法是要从0开始，从前端到后端，然后部署到服务器的博客。看了一下相关视频和资料，想想还是算了。这不仅因为我懒，还因为看到了hexo。">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://s1.ax1x.com/2020/06/01/tJAuS1.jpg">
<meta property="og:image" content="https://s1.ax1x.com/2020/06/01/tJmOe0.jpg">
<meta property="og:image" content="https://s1.ax1x.com/2020/06/01/tJ77Ox.jpg">
<meta property="og:image" content="https://s1.ax1x.com/2020/06/01/tJoo4J.jpg">
<meta property="article:published_time" content="2020-06-01T09:21:17.000Z">
<meta property="article:modified_time" content="2020-06-03T02:53:32.233Z">
<meta property="article:author" content="半口奶酪">
<meta property="article:tag" content="hexo">
<meta property="article:tag" content="next">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://s1.ax1x.com/2020/06/01/tJAuS1.jpg">

<link rel="canonical" href="https://bankounailao.gitee.io/blog/2020/06/01/%E5%9C%A8gitee%E4%B8%8A%E6%90%AD%E5%BB%BAhexo%E4%B8%8A%E7%9A%84%E9%82%A3%E4%BA%9B%E5%9D%91/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>在gitee上搭建hexo上的那些坑 | 半口奶酪的小站</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/blog/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">半口奶酪的小站</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/blog/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/blog/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/blog/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/blog/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://bankounailao.gitee.io/blog/2020/06/01/%E5%9C%A8gitee%E4%B8%8A%E6%90%AD%E5%BB%BAhexo%E4%B8%8A%E7%9A%84%E9%82%A3%E4%BA%9B%E5%9D%91/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/blog/uploads/avatar.jpg">
      <meta itemprop="name" content="半口奶酪">
      <meta itemprop="description" content="再来一万次，我也愿意伸手去捧水中碎月，什么都是虚的，但是没关系">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="半口奶酪的小站">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          在gitee上搭建hexo上的那些坑
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2020-06-01 17:21:17" itemprop="dateCreated datePublished" datetime="2020-06-01T17:21:17+08:00">2020-06-01</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2020-06-03 10:53:32" itemprop="dateModified" datetime="2020-06-03T10:53:32+08:00">2020-06-03</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/%E6%95%99%E7%A8%8B/" itemprop="url" rel="index"><span itemprop="name">教程</span></a>
                </span>
                  >
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/%E6%95%99%E7%A8%8B/hexo/" itemprop="url" rel="index"><span itemprop="name">hexo</span></a>
                </span>
            </span>

          
            <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv" style="display: none;">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span id="busuanzi_value_page_pv"></span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p>本来搭建博客的想法是要从0开始，从前端到后端，然后部署到服务器的博客。看了一下相关视频和资料，想想还是算了。这不仅因为我懒，还因为看到了hexo。</p>
<a id="more"></a>

<h2 id="1-git-clone速度太慢"><a href="#1-git-clone速度太慢" class="headerlink" title="1.git clone速度太慢"></a>1.git clone速度太慢</h2><p>在使用cmd来clone主题的时候，速度真的一言难尽，本身next主题这个包就有点大，大概有9M左右，几KB的下载速度，还能断掉。最开始为了省事，发现下载5.1.4版本的速度还蛮快的，也只有不到4M，事实证明还是太年轻了，这种已经没有被维护的包，bug有点多。后面发现使用git bash速度要稳很多，虽然中途也断了一次，但是还算比较顺利。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ cd hexo</span><br><span class="line">$ git clone https:&#x2F;&#x2F;github.com&#x2F;theme-next&#x2F;hexo-theme-next themes&#x2F;next</span><br></pre></td></tr></table></figure>

<h2 id="2-部署的内容不显示"><a href="#2-部署的内容不显示" class="headerlink" title="2.  部署的内容不显示"></a>2.  部署的内容不显示</h2><p>在cmd完成一下操作后，用域名访问博客界面却还是部署之前的内容。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">hexo clean</span><br><span class="line">hexo g</span><br><span class="line">hexo d</span><br></pre></td></tr></table></figure>

<p>这个问题最开始确实很困扰我，反复的执行以上操作，还是没有任何效果。之前在github上部署的时候，就不会存在这个问题，但是部署在码云上的时候，就出现了。查询了相关的资料之后，说是涉及到缓存机制。我反复刷新，删除浏览器缓存都无解。后面才搞明白，这个锅是码云的。码云的pages不能自动更新部署，需要用户手动更新，之后氪金版的pages pro才能实现自动部署。</p>
<p><img src="https://s1.ax1x.com/2020/06/01/tJAuS1.jpg" alt="部署更新"></p>
<h2 id="3-归档功能异常"><a href="#3-归档功能异常" class="headerlink" title="3.归档功能异常"></a>3.归档功能异常</h2><p>我用next<code>v4.1.5</code>的时候,next主题是Pisces，这个主题侧边栏有个日志，其实就是归档。</p>
<p><img src="https://s1.ax1x.com/2020/06/01/tJmOe0.jpg" alt></p>
<p>但是点击上面的归档就没有什么问题，点击下面的日志就报错了，仔细一看链接的地址<code>/archives/%7C%7C%20archive/</code>，发现事情有点不对劲。查了转义字符发现<code>%7C%7C%20</code>是<code>|| 空格</code> 的意思，然后看了一下主题的配置文件。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">menu:</span><br><span class="line">  home: &#x2F;|| home</span><br><span class="line">  #about: &#x2F;about&#x2F;|| user</span><br><span class="line">  tags: &#x2F;tags&#x2F; || tags</span><br><span class="line">  categories: &#x2F;categories&#x2F; || th</span><br><span class="line">  archives: &#x2F;archives&#x2F; || archive</span><br><span class="line">  #Friends: &#x2F;Friends&#x2F;|| heartbeat</span><br><span class="line">  #schedule: &#x2F;schedule&#x2F; || calendar</span><br><span class="line">  #sitemap: &#x2F;sitemap.xml || sitemap</span><br><span class="line">  #commonweal: &#x2F;404&#x2F; || heartbeat</span><br></pre></td></tr></table></figure>

<p>之前配置报错的时候，把<code>archives: /archives/ || archive</code>里面的空格删了一个，结果到下面，<code>||</code>又被转义了。解决这个bug需要把<code>themes/next/layout/_partials/sidebar</code>里面的 <code>site-overview.swig</code>找到一下代码块：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">&#123;% if config.archive_dir !&#x3D; &#39;&#x2F;&#39; and site.posts.length &gt; 0 %&#125;</span><br><span class="line">             &lt;div class&#x3D;&quot;site-state-item site-state-posts&quot;&gt;</span><br><span class="line">             &#123;% if theme.menu.archives %&#125;</span><br><span class="line">               &lt;a href&#x3D;&quot;&#123;&#123; url_for(theme.menu.archives).split(&#39;||&#39;)[0] | trim &#125;&#125;&quot;&gt;</span><br><span class="line">             &#123;% else %&#125;</span><br><span class="line">               &lt;a href&#x3D;&quot;&#123;&#123; url_for(config.archive_dir) &#125;&#125;&quot;&gt;</span><br><span class="line">             &#123;% endif %&#125;</span><br><span class="line">                 &lt;span class&#x3D;&quot;site-state-item-count&quot;&gt;&#123;&#123; site.posts.length &#125;&#125;&lt;&#x2F;span&gt;</span><br><span class="line">                 &lt;span class&#x3D;&quot;site-state-item-name&quot;&gt;&#123;&#123; __(&#39;state.posts&#39;) &#125;&#125;&lt;&#x2F;span&gt;</span><br><span class="line">               &lt;&#x2F;a&gt;</span><br><span class="line">             &lt;&#x2F;div&gt;</span><br><span class="line">&#123;% endif %&#125;</span><br></pre></td></tr></table></figure>

<p>将其修改成以下代码：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">&#123;% if config.archive_dir !&#x3D; &#39;&#x2F;&#39; and site.posts.length &gt; 0 %&#125;</span><br><span class="line">              &lt;div class&#x3D;&quot;site-state-item site-state-posts&quot;&gt;</span><br><span class="line">                &lt;a href&#x3D;&quot;&#123;&#123; url_for(config.archive_dir) &#125;&#125;&quot;&gt;</span><br><span class="line">                  &lt;span class&#x3D;&quot;site-state-item-count&quot;&gt;&#123;&#123; site.posts.length &#125;&#125;&lt;&#x2F;span&gt;</span><br><span class="line">                  &lt;span class&#x3D;&quot;site-state-item-name&quot;&gt;&#123;&#123; __(&#39;state.posts&#39;) &#125;&#125;&lt;&#x2F;span&gt;</span><br><span class="line">                &lt;&#x2F;a&gt;</span><br><span class="line">              &lt;&#x2F;div&gt;</span><br><span class="line">&#123;% endif %&#125;</span><br></pre></td></tr></table></figure>

<p>当然，最好的办法就是用最新版本的next主题，这些远古bug早已被修复。</p>
<h2 id="4-上传图片"><a href="#4-上传图片" class="headerlink" title="4.上传图片"></a>4.上传图片</h2><p>严格来说，这个不算什么坑，主要还是自己菜，在此记录一下上传图片的两种方法。</p>
<h3 id="1-本地上传"><a href="#1-本地上传" class="headerlink" title="1.本地上传"></a>1.本地上传</h3><p>最开始我是直接将图片丢到typora中，无论我怎么刷新都没用，图片都无法显示，查看图片的路径之后，发现是绝对路径。果然，传图片没有这么简单。后面查到了一种与Typora结合的方法，一共分为三步。</p>
<h4 id="1-安装插件"><a href="#1-安装插件" class="headerlink" title="1.安装插件"></a>1.安装插件</h4><p>安装<code>hexo-zngw-asset-image</code>插件。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">cnpm install hexo-zngw-asset-image --save</span><br></pre></td></tr></table></figure>

<h4 id="2-修改配置"><a href="#2-修改配置" class="headerlink" title="2.修改配置"></a>2.修改配置</h4><p>修改根目录下<code>_config.yml</code>配置文件。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">post_asset_folder: true</span><br></pre></td></tr></table></figure>

<p>只修改这个还是不够的，还需要添加一行代码，不然路径还是会有问题。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">imgroot: &#x2F;  #如查有第三方图片存储添写，如果用本地用&#96;&#x2F;&#96;</span><br></pre></td></tr></table></figure>

<p>其实做好了以上两个步骤，基本上就可以正常插入图片了。当new了新的文章之后，系统会在同一目录下，自动生成一个和文章同名文件夹。如<code>在gitee上搭建hexo上的那些坑.md</code>这个文件，系统会生成同名<code>在gitee上搭建hexo上的那些坑</code>目录，使用的时候，将图片从这个目录中拖进Typora就可以了。</p>
<h4 id="3-Typora-中使用"><a href="#3-Typora-中使用" class="headerlink" title="3.Typora 中使用"></a>3.Typora 中使用</h4><p>与Typora结合使用，才是最方便的。在实现前两步的基础上，我们进行一下设置后，只需要将使用的图片拖进Typora中的相应位置，就可以了，就这么方便。</p>
<p><img src="https://s1.ax1x.com/2020/06/01/tJ77Ox.jpg" alt="偏好设置"></p>
<h3 id="2-使用图床"><a href="#2-使用图床" class="headerlink" title="2.使用图床"></a>2.使用图床</h3><p>虽然可以本地上传，码云也有5G的免费空间(真香)，但是想着万一咱以后写得多了，图传多了，空间不够怎么办(哈哈)。</p>
<p>我这里使用的是路过图床，免费使用，唯一遗憾的是不能配合Typora来实现自动上传。使用方法也比较简单，再插入位置鼠标右键，选择插入图片，图片路径填入复制的URL链接即可。</p>
<p><img src="https://s1.ax1x.com/2020/06/01/tJoo4J.jpg" alt="路过图床"></p>
<h2 id="5-总结"><a href="#5-总结" class="headerlink" title="5.总结"></a>5.总结</h2><ul>
<li>要想全面的对主题进行了解，还是得看官方给的文档，很清晰也很全面，有的不了解的地方，再去搜一下作为补充即可。</li>
<li>作为小白，尽量不要碰小众的主题，小众的主题坑多，维护慢。使用人少还意味着能查询到的资料少，出了问题很难解决。</li>
</ul>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/blog/tags/hexo/" rel="tag"><i class="fa fa-tag"></i> hexo</a>
              <a href="/blog/tags/next/" rel="tag"><i class="fa fa-tag"></i> next</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/blog/2020/06/01/gitee+hexo%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/" rel="prev" title="gitee+hexo博客搭建">
      <i class="fa fa-chevron-left"></i> gitee+hexo博客搭建
    </a></div>
      <div class="post-nav-item"></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-git-clone速度太慢"><span class="nav-number">1.</span> <span class="nav-text">1.git clone速度太慢</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-部署的内容不显示"><span class="nav-number">2.</span> <span class="nav-text">2.  部署的内容不显示</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-归档功能异常"><span class="nav-number">3.</span> <span class="nav-text">3.归档功能异常</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#4-上传图片"><span class="nav-number">4.</span> <span class="nav-text">4.上传图片</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-本地上传"><span class="nav-number">4.1.</span> <span class="nav-text">1.本地上传</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-安装插件"><span class="nav-number">4.1.1.</span> <span class="nav-text">1.安装插件</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-修改配置"><span class="nav-number">4.1.2.</span> <span class="nav-text">2.修改配置</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3-Typora-中使用"><span class="nav-number">4.1.3.</span> <span class="nav-text">3.Typora 中使用</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-使用图床"><span class="nav-number">4.2.</span> <span class="nav-text">2.使用图床</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#5-总结"><span class="nav-number">5.</span> <span class="nav-text">5.总结</span></a></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="半口奶酪"
      src="/blog/uploads/avatar.jpg">
  <p class="site-author-name" itemprop="name">半口奶酪</p>
  <div class="site-description" itemprop="description">再来一万次，我也愿意伸手去捧水中碎月，什么都是虚的，但是没关系</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/blog/archives/">
        
          <span class="site-state-item-count">2</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/blog/categories/">
          
        <span class="site-state-item-count">2</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/blog/tags/">
          
        <span class="site-state-item-count">3</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-heartbeat"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">半口奶酪</span>
</div>
 <!-- <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://pisces.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Pisces</a> 强力驱动
  </div>
 --><script color="0,0,255" opacity="0.5" zIndex="-1" count="99" src="https://cdn.jsdelivr.net/npm/canvas-nest.js@1/dist/canvas-nest.js"></script>

        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>








      </div>
    </footer>
  </div>

  
  <script src="/blog/lib/anime.min.js"></script>
  <script src="/blog/lib/velocity/velocity.min.js"></script>
  <script src="/blog/lib/velocity/velocity.ui.min.js"></script>

<script src="/blog/js/utils.js"></script>

<script src="/blog/js/motion.js"></script>


<script src="/blog/js/schemes/pisces.js"></script>


<script src="/blog/js/next-boot.js"></script>




  




  
<script src="/blog/js/local-search.js"></script>













  

  

  
  
   <canvas class="fireworks" style="position: fixed;left: 0;top: 0;z-index: 1; pointer-events: none;" ></canvas> 
   <script type="text/javascript" src="//cdn.bootcss.com/animejs/2.2.0/anime.min.js"></script> 
   <script type="text/javascript" src="/js/src/fireworks.js"></script>
  
  
</body>

</html>

